<%@ include file="/taglibs.jsp"%>
<s:form name="transferFileForm" id="transferFileForm" action="transferFile" method="post" >
	<s:hidden name="id" value="%{file.id}"/>
	
	<fieldset>
		<legend><s:text name="file.nextstep.info.title"></s:text></legend>
		
		<s:if test="%{#currStep < #maxStep}">
			<s:text name="file.nextstep.info.name"></s:text>
			<s:iterator status="stat" var="workflowProcess" value="workflowProcesses" >
				<s:if test="%{#workflowProcess.position == (#currStep + 1)}">
					<b><s:property value="#workflowProcess.processStatus.status"/></b><br>
					<s:text name="file.nextstep.info.description"></s:text><b><s:property value="#workflowProcess.processStatus.description"/></b>
				</s:if>
			</s:iterator>
			
			
		</s:if>
	</fieldset>
	
<table>
	<tr> 
	    <td width="200"> 
			<input type="radio" name="chkBoxReject" id="chkBox_Approve" value="approve" CHECKED ></input>
	        <s:property value="getText('file.checkbox.approve')"/>
	    </td>	
	    <td> 
			<input type="radio" name="chkBoxReject" id="chkBox_Reject" value="reject"></input>
	        <s:property value="getText('file.checkbox.reject')"/>
	    </td>				    			    
    </tr> 
</table>
	
	<s:select label="%{getText('file.group')}" name="groupIdToTransfer" 
			list="depts" listKey="id" listValue="name" 
			headerKey="%{getText('select.default.key')}" headerValue="%{getText('select.default.value')}"/>

	<s:select headerKey="%{getText('select.default.key')}" headerValue="%{getText('select.default.value')}"
		         label="%{getText('file.user')}" list="listUserForTransfer" listValue="name"
		         name="userTransfers"  listKey="value"/>

<table id="commentPanel">
    <tr>
	    <td>
	    	<s:property value="getText('approved_comment')"/>:
	    </td>
	</tr>					
    <tr>
	    <td>
	    	<s:textarea maxlength="600" key="approved_comment" cols="60" rows="5" theme="simple" />
	    </td>
	</tr>
</table>
<p></p>
	<table>
	<tr>
	    <td>
	    	<s:a href="javascript:void(0)" id="transfer">
	    		<img src="${ctx}/images/btn_link_move_file.png">
			</s:a>							
		</td>	
	</tr>
	</table>
</s:form> 

<script type="text/javascript">//<![CDATA[
      
		$('#commentPanel').hide();
	
      	$('#chkBox_Approve').click(function(){
      		$('#commentPanel').hide();
  		});
      	$('#chkBox_Reject').click(function(){
      		$('#commentPanel').show();
  		});
    //]]></script>